package co.edu.unal.satacredito.franchises.mediation;

import java.util.List;

import javax.ejb.Stateless;

import co.edu.unal.satacredito.franchises.application.FranchiseFacade;
import co.edu.unal.satacredito.franchises.infrastructure.dto.FranchiseDTO;

/**
 * Session Bean implementation class FranchisesEJB
 */
@Stateless
public class FranchisesEJB implements FranchisesEJBRemote, FranchisesEJBLocal {

	private FranchiseFacade franchiseFacade;
	
    /**
     * Default constructor. 
     */
    public FranchisesEJB() {
        franchiseFacade = new FranchiseFacade();
    }

    @Override
	public FranchiseDTO insertFranchise(FranchiseDTO franchiseDTO) {
		
		return franchiseFacade.insertFranchise(franchiseDTO);
	}

	@Override
	public List<FranchiseDTO> getAllFranchises() {
		return franchiseFacade.getAllFranchises();
	}

}
